import minRequest from '@/config/minRequest.js'
const url = '/customer'

// 创建
export const addOrUpdate = (data) => minRequest.post(url + '/customerAgent/addOrUpdate', data)
export const getAgentsOfMineList = (data) => minRequest.post(url + '/customerAgent/getAgentsOfMineList', data)
export const getMyAgentsList = (data) => minRequest.post(url + '/customerAgent/getMyAgentsList', data)

// 获取优惠券状态
export const checkCouponStatus = (favorableId) => minRequest.get(url +
	`/favorable_led/judgeCouponsCustomersCanClaim/${favorableId}`)


// 删除
export const deleteF = (id) => minRequest.post(url + `/customerAgent/delete/${id}`,)
// 客户小程序 发布资讯
export function uploadBlogCustomer(data) {
	return minRequest.post(url + `/blogCustomer/uploadBlog`, data);
}
// 客户小程序 编辑资讯
export function editBlogCustomer(data) {
	return minRequest.post(url + `/blogCustomer/editBlog`, data);
}
// 删除咨询列表
export function delBlog(videoInfoId) {
	return minRequest.delete(url + `/blogCustomer/delBlog/${videoInfoId}`);
}

// 上传视频
export function uploadVideoCustomer(data) {
	return minRequest.post(url + `/video_info_customer/uploadVideo`, data);
}
// 修改上传视频
export function updateSalesmanVideo(data) {
	return minRequest.post(url + `/video_info_customer/updateSalesmanVideo`, data);
}
export function pageAgentVideoCustomer(data) {
	return minRequest.post(url + `/video_info_customer/pageAgentVideo`, data);
}

export function getBlogInfoCustomer(videoInfoId) {
	return minRequest.get(url + `/video_info_customer/getVideoById/${videoInfoId}`);
}
// 删除视频
export function deleteSalesmanVideo(videoInfoId) {
	return minRequest.delete(url + `/video_info_customer/deleteSalesmanVideo/${videoInfoId}`);
}
export function getNextVideoNumByVideoSeries(videoInfoId) {
	return minRequest.get(url + `/video_info_customer/open/getNextVideoNumByVideoSeries/${videoInfoId}`);
}